#pragma once
#include <windows.h>
#include "CustomTree.h"
#include "Form.h"
#include "Message.h"

#ifndef TREE_STRUCT
#define TREE_STRUCT
typedef util::myTree<HWND, core::form::AbstractForm> FormTree;
typedef util::myTreeNode<HWND, core::form::AbstractForm> FormNode;
#endif

#ifndef HINST_THISCOMPONENT
EXTERN_C IMAGE_DOS_HEADER __ImageBase;
#define HINST_THISCOMPONENT ((HINSTANCE)&__ImageBase)
#endif




namespace core{
    namespace app{
        class App : public util::message::IMessageHandler{
            public:
                App();

                HRESULT Initialize();

                void RunMessageLoop();

                virtual bool Receive(util::message::MessageType msg, void * param);

                void Exit();

                ~App();
            private:
            //custom struct
            FormTree formTree;
            //win struct
        };

    }
}
